<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link type="text/css" rel="stylesheet" href="../../resource/css/reset.css"/>
        <link type="text/css" rel="stylesheet" href="../../resource/css/api_index.css"/>
        <script type="text/javascript" src="../../resource/js/fw/jquery-1.8.3.min.js"></script>
    </head>
    <body>
        <div class="pk-wrap">

            <div class="pk-unit-wrap">
                <div class="pk-unit">
                    <h1 class="clearfix">
                        <span class="pk-color-title">Array (对数组的内置支持)</span>
                        <span class="pk-float-right pk-tip">Core > Object > Array</span>
                    </h1>
                </div>
                <div class="pk-unit">
                    <div class="pk-unit-with-style">
                        <div class="pk-unit-tag">Description</div>
                        <pre>    数组是Javascript的基本特性。
    构造函数：
        new Array()
        new Array(size)
        new Array(el0,el1,...,eln)</pre>
                    </div>
                </div>
            </div>

                        <div class="pk-unit-wrap">
                <div class="pk-unit">
                    <h1 class="clearfix">
                        <span class="pk-color-title pk-italic">参数 [size,[el0,el1,...,eln]]</span>
                    </h1>
                </div>
                <div class="pk-unit">
                    <table>
                        <thead>
                            <tr>
                                <th class="pk-w120">参数名</th>
                                <th>描述</th>
                            </tr>
                        </thead>
                        <tbody>
                                                        <tr>
                                <td>size</td>
                                <td>设定的数组元素个数。返回数组的length属性等于size。</td>
                            </tr>
                                                        <tr>
                                <td>el0,el1,...,eln</td>
                                <td>参数列表，可以是两个或多个任意值。当Array()构造函数用这些参数调用时，新创建的数组实例会用指定的参数值来初始化，并将length属性设置为参数个数。</td>
                            </tr>
                                                    </tbody>
                    </table>
                </div>
            </div>
            
                        <div class="pk-unit-wrap">
                <div class="pk-unit">
                    <h1 class="clearfix">
                        <span class="pk-color-title pk-italic">返回值</span>
                    </h1>
                </div>
                <div class="pk-unit">
                    <div class="pk-unit-with-style">
                        <div class="pk-unit-tag">Description</div>
                        <pre>新创建和初始化的数组。当不带参数调用Array()时，返回的数组为空，length属性为0。当用单个数值参数调用时，构造函数返回的数组带有指定个数的未定义元素。使用其他参数调用时，构造函数会使用指定的参数值初始化数组。当Array()构造函数不带new操作符，直接当做函数调用时，其表现行为与带有new操作符调用时是完全一样的。</pre>
                    </div>
                </div>
            </div>
            
                        <div class="pk-unit-wrap">
                <div class="pk-unit">
                    <h1 class="clearfix">
                        <span class="pk-color-title pk-italic">属性</span>
                    </h1>
                </div>
                <div class="pk-unit">
                    <table>
                        <thead>
                            <tr>
                                <th class="pk-w120">属性名</th>
                                <th>描述</th>
                            </tr>
                        </thead>
                        <tbody>
                                                        <tr>
                                <td>length</td>
                                <td>一个可读/写的整数，用来指明数组中的元素个数。当数组中的元素不连续时，length等于数组中最后一个元素的序号加一。改变length值会裁减或扩充数组。</td>
                            </tr>
                                                    </tbody>
                    </table>
                </div>
            </div>
            
                        <div class="pk-unit-wrap">
                <div class="pk-unit">
                    <h1 class="clearfix">
                        <span class="pk-color-title pk-italic">方法</span>
                    </h1>
                </div>
                <div class="pk-unit">
                    <table>
                        <thead>
                            <tr>
                                <th class="pk-w120">方法名</th>
                                <th>描述</th>
                            </tr>
                        </thead>
                        <tbody>
                                                        <tr>
                                <td>concat()</td>
                                <td>把元素衔接到数组中。</td>
                            </tr>
                                                        <tr>
                                <td>every()</td>
                                <td>测试断言函数是否对每个数组元素都为真。</td>
                            </tr>
                                                        <tr>
                                <td>filter()</td>
                                <td>返回满足断言函数的数组元素。</td>
                            </tr>
                                                        <tr>
                                <td>forEach()</td>
                                <td>为数组的每一个元素调用指定函数。</td>
                            </tr>
                                                        <tr>
                                <td>indexOf()</td>
                                <td>在数组中查找匹配元素。</td>
                            </tr>
                                                        <tr>
                                <td>join()</td>
                                <td>将数组的所有元素转化为字符串，并衔接起来。</td>
                            </tr>
                                                        <tr>
                                <td>lastIndexOf()</td>
                                <td>在数组中反向查找。</td>
                            </tr>
                                                        <tr>
                                <td>map()</td>
                                <td>从数组的元素中，计算出新的数组元素。</td>
                            </tr>
                                                        <tr>
                                <td>pop()</td>
                                <td>移除数组最后一个元素。</td>
                            </tr>
                                                        <tr>
                                <td>push()</td>
                                <td>把元素添加到数组尾部。</td>
                            </tr>
                                                        <tr>
                                <td>reduce()</td>
                                <td>从数组的元素中，计算出一个值。</td>
                            </tr>
                                                        <tr>
                                <td>reduceRight()</td>
                                <td>从右到左缩减数组。</td>
                            </tr>
                                                        <tr>
                                <td>reverse()</td>
                                <td>在原数组中点到数组元素的顺序。</td>
                            </tr>
                                                        <tr>
                                <td>shift()</td>
                                <td>移除数组的第一个元素。</td>
                            </tr>
                                                        <tr>
                                <td>slice()</td>
                                <td>返回数组的一部分。</td>
                            </tr>
                                                        <tr>
                                <td>some()</td>
                                <td>测试是否至少有一个数组元素能让断言函数为真。</td>
                            </tr>
                                                        <tr>
                                <td>sort()</td>
                                <td>在原数组中对数组元素进行排序。</td>
                            </tr>
                                                        <tr>
                                <td>splice()</td>
                                <td>插入、删除或替换数组元素。</td>
                            </tr>
                                                        <tr>
                                <td>toLocaleString()</td>
                                <td>将数组转化为本地化字符串。</td>
                            </tr>
                                                        <tr>
                                <td>toString()</td>
                                <td>将数组转化为字符串。</td>
                            </tr>
                                                        <tr>
                                <td>unshift()</td>
                                <td>在数组头部插入元素。</td>
                            </tr>
                                                    </tbody>
                    </table>
                </div>
            </div>
            
                    </div>
    </body>
</html>
